public class Main {
    public static int Find(int[] arrays,int num){
        for(int i=0;i< arrays.length;i++){
            if(arrays[i]==num){
                return i;
            }
        }
        return -1;
    }

    public static void main(String[] args) {
        int[] arrays={8,7,4,10,25,16,2};
        System.out.println(Find(arrays,25));//调用Find方法，传入数组arrays和要查找的元素25
    }
}
